{
  "properties" : { },
  "id" : "copy1739464651757d68586",
  "script" : null,
  "groupId" : "baa2d717479b4da3bd31572a3173a5d7",
  "name" : "获取路径下文件(记录)",
  "createTime" : null,
  "updateTime" : 1739549141025,
  "lock" : null,
  "createBy" : null,
  "updateBy" : "可辉",
  "path" : "getPathFilesAndSave",
  "description" : null,
  "returnType" : null,
  "mappingPath" : null,
  "parameters" : [ {
    "name" : "path",
    "value" : null,
    "description" : null,
    "required" : false,
    "dataType" : "String",
    "type" : "java.lang.String",
    "defaultValue" : null,
    "validateType" : null,
    "error" : null,
    "expression" : null,
    "children" : null
  } ]
}
================================
import '@/features/getPathFilesAndSave' as getPathFilesAndSave;
import java.io.File;
import log;

File file = new File(path);
// 如果是目录就打印  目录下的文件
if(file.isDirectory()){
    var files = file.listFiles();

    for (file2 in files) {
        if(file2.isDirectory()){
            getPathFilesAndSave(file2.getPath());
        } else {
db.table('file_videos').primary('path', file2.getPath()).save({
        "name": file2.getName(),
        "size": file2.length() / (1024 * 1024),
        "tags": ""
    })
        }
    }
       
}
